package com.tedu.charging.service.device.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tedu.charging.common.pojo.po.GunStationPO;
import org.apache.ibatis.annotations.Select;



public interface GunStationMapper extends BaseMapper<GunStationPO> {
    @Select("SELECT s.operator_id,s.id AS station_id\n" +
            "FROM charging_gun_info g,charging_pile_info p,charging_station s\n" +
            "WHERE g.id=#{gunId}\n" +
            "AND p.id=g.pile_id\n" +
            "AND s.id=p.station_id")
    public GunStationPO selectByGunId(Integer gunId);
}
